<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>

<script>
	

//工厂模式
// 造一辆车 出厂 （合格证/建议零售价/说明书）
		function  createCar(){
			var oTempCar = new Object;
			oTempCar.name = "福特野马"
			oTempCar.certificate = "合格";
			oTempCar.price = "裸价31w";
			oTempCar.instructions = "费用说明:购置税、车险、质保、上牌费和运输费.";
			return oTempCar; 
		}
		var car1 = createCar();
		document.write(car1.name+"<br />"+car1.certificate+"<br />"+car1.price+"<br />"+car1.instructions);
		
</script>
	</body>
</html>
